3.807 \(\int (d+e x) (f+g x)^n (a+2 c d x+c e x^2) \, dx\)

Optimal. Leaf size=146 \[ \frac{(f+g x)^{n+2} \left (a e g^2+c \left (2 d^2 g^2-6 d e f g+3 e^2 f^2\right )\right )}{g^4 (n+2)}-\frac{(e f-d g) (f+g x)^{n+1} \left (a g^2+c f (e f-2 d g)\right )}{g^4 (n+1)}-\frac{3 c e (e f-d g) (f+g x)^{n+3}}{g^4 (n+3)}+\frac{c e^2 (f+g x)^{n+4}}{g^4 (n+4)} \]

[Out]

-(((e*f - d*g)*(a*g^2 + c*f*(e*f - 2*d*g))*(f + g*x)^(1 + n))/(g^4*(1 + n))) + ((a*e*g^2 + c*(3*e^2*f^2 - 6*d*
e*f*g + 2*d^2*g^2))*(f + g*x)^(2 + n))/(g^4*(2 + n)) - (3*c*e*(e*f - d*g)*(f + g*x)^(3 + n))/(g^4*(3 + n)) + (
c*e^2*(f + g*x)^(4 + n))/(g^4*(4 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.112171, antiderivative size = 146, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.038, Rules used = {771} \[ \frac{(f+g x)^{n+2} \left (a e g^2+c \left (2 d^2 g^2-6 d e f g+3 e^2 f^2\right )\right )}{g^4 (n+2)}-\frac{(e f-d g) (f+g x)^{n+1} \left (a g^2+c f (e f-2 d g)\right )}{g^4 (n+1)}-\frac{3 c e (e f-d g) (f+g x)^{n+3}}{g^4 (n+3)}+\frac{c e^2 (f+g x)^{n+4}}{g^4 (n+4)} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)*(f + g*x)^n*(a + 2*c*d*x + c*e*x^2),x]

[Out]

-(((e*f - d*g)*(a*g^2 + c*f*(e*f - 2*d*g))*(f + g*x)^(1 + n))/(g^4*(1 + n))) + ((a*e*g^2 + c*(3*e^2*f^2 - 6*d*
e*f*g + 2*d^2*g^2))*(f + g*x)^(2 + n))/(g^4*(2 + n)) - (3*c*e*(e*f - d*g)*(f + g*x)^(3 + n))/(g^4*(3 + n)) + (
c*e^2*(f + g*x)^(4 + n))/(g^4*(4 + n))

Rule 771

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin{align*} \int (d+e x) (f+g x)^n \left (a+2 c d x+c e x^2\right ) \, dx &=\int \left (\frac{(e f-d g) \left (-a g^2-c f (e f-2 d g)\right ) (f+g x)^n}{g^3}+\frac{\left (a e g^2+c \left (3 e^2 f^2-6 d e f g+2 d^2 g^2\right )\right ) (f+g x)^{1+n}}{g^3}-\frac{3 c e (e f-d g) (f+g x)^{2+n}}{g^3}+\frac{c e^2 (f+g x)^{3+n}}{g^3}\right ) \, dx\\ &=-\frac{(e f-d g) \left (a g^2+c f (e f-2 d g)\right ) (f+g x)^{1+n}}{g^4 (1+n)}+\frac{\left (a e g^2+c \left (3 e^2 f^2-6 d e f g+2 d^2 g^2\right )\right ) (f+g x)^{2+n}}{g^4 (2+n)}-\frac{3 c e (e f-d g) (f+g x)^{3+n}}{g^4 (3+n)}+\frac{c e^2 (f+g x)^{4+n}}{g^4 (4+n)}\\ \end{align*}

Mathematica [A]  time = 0.291619, size = 141, normalized size = 0.97 \[ \frac{(f+g x)^{n+1} \left (\frac{2 (f+g x) \left (a e g^2 (n+3)+c \left (-d^2 g^2 n-6 d e f g+3 e^2 f^2\right )\right )}{g^2 (n+2)}+\frac{6 (d g-e f) \left (a g^2+c f (e f-2 d g)\right )}{g^2 (n+1)}+(a+c x (2 d+e x)) (d g (n+6)-3 e f+e g (n+3) x)\right )}{g^2 (n+3) (n+4)} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)*(f + g*x)^n*(a + 2*c*d*x + c*e*x^2),x]

[Out]

((f + g*x)^(1 + n)*((6*(-(e*f) + d*g)*(a*g^2 + c*f*(e*f - 2*d*g)))/(g^2*(1 + n)) + (2*(a*e*g^2*(3 + n) + c*(3*
e^2*f^2 - 6*d*e*f*g - d^2*g^2*n))*(f + g*x))/(g^2*(2 + n)) + (-3*e*f + d*g*(6 + n) + e*g*(3 + n)*x)*(a + c*x*(
2*d + e*x))))/(g^2*(3 + n)*(4 + n))

________________________________________________________________________________________

Maple [B]  time = 0.05, size = 449, normalized size = 3.1 \begin{align*}{\frac{ \left ( gx+f \right ) ^{1+n} \left ( c{e}^{2}{g}^{3}{n}^{3}{x}^{3}+3\,cde{g}^{3}{n}^{3}{x}^{2}+6\,c{e}^{2}{g}^{3}{n}^{2}{x}^{3}+2\,c{d}^{2}{g}^{3}{n}^{3}x+21\,cde{g}^{3}{n}^{2}{x}^{2}-3\,c{e}^{2}f{g}^{2}{n}^{2}{x}^{2}+11\,c{e}^{2}{g}^{3}n{x}^{3}+ae{g}^{3}{n}^{3}x+16\,c{d}^{2}{g}^{3}{n}^{2}x-6\,cdef{g}^{2}{n}^{2}x+42\,cde{g}^{3}n{x}^{2}-9\,c{e}^{2}f{g}^{2}n{x}^{2}+6\,c{e}^{2}{x}^{3}{g}^{3}+ad{g}^{3}{n}^{3}+8\,ae{g}^{3}{n}^{2}x-2\,c{d}^{2}f{g}^{2}{n}^{2}+38\,c{d}^{2}{g}^{3}nx-30\,cdef{g}^{2}nx+24\,cde{g}^{3}{x}^{2}+6\,c{e}^{2}{f}^{2}gnx-6\,c{e}^{2}f{g}^{2}{x}^{2}+9\,ad{g}^{3}{n}^{2}-aef{g}^{2}{n}^{2}+19\,ae{g}^{3}nx-14\,c{d}^{2}f{g}^{2}n+24\,c{d}^{2}{g}^{3}x+6\,cde{f}^{2}gn-24\,cdef{g}^{2}x+6\,c{e}^{2}{f}^{2}gx+26\,ad{g}^{3}n-7\,aef{g}^{2}n+12\,ae{g}^{3}x-24\,c{d}^{2}f{g}^{2}+24\,cde{f}^{2}g-6\,c{e}^{2}{f}^{3}+24\,ad{g}^{3}-12\,aef{g}^{2} \right ) }{{g}^{4} \left ({n}^{4}+10\,{n}^{3}+35\,{n}^{2}+50\,n+24 \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(g*x+f)^n*(c*e*x^2+2*c*d*x+a),x)

[Out]

(g*x+f)^(1+n)*(c*e^2*g^3*n^3*x^3+3*c*d*e*g^3*n^3*x^2+6*c*e^2*g^3*n^2*x^3+2*c*d^2*g^3*n^3*x+21*c*d*e*g^3*n^2*x^
2-3*c*e^2*f*g^2*n^2*x^2+11*c*e^2*g^3*n*x^3+a*e*g^3*n^3*x+16*c*d^2*g^3*n^2*x-6*c*d*e*f*g^2*n^2*x+42*c*d*e*g^3*n
*x^2-9*c*e^2*f*g^2*n*x^2+6*c*e^2*g^3*x^3+a*d*g^3*n^3+8*a*e*g^3*n^2*x-2*c*d^2*f*g^2*n^2+38*c*d^2*g^3*n*x-30*c*d
*e*f*g^2*n*x+24*c*d*e*g^3*x^2+6*c*e^2*f^2*g*n*x-6*c*e^2*f*g^2*x^2+9*a*d*g^3*n^2-a*e*f*g^2*n^2+19*a*e*g^3*n*x-1
4*c*d^2*f*g^2*n+24*c*d^2*g^3*x+6*c*d*e*f^2*g*n-24*c*d*e*f*g^2*x+6*c*e^2*f^2*g*x+26*a*d*g^3*n-7*a*e*f*g^2*n+12*
a*e*g^3*x-24*c*d^2*f*g^2+24*c*d*e*f^2*g-6*c*e^2*f^3+24*a*d*g^3-12*a*e*f*g^2)/g^4/(n^4+10*n^3+35*n^2+50*n+24)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(g*x+f)^n*(c*e*x^2+2*c*d*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.64494, size = 1173, normalized size = 8.03 \begin{align*} \frac{{\left (a d f g^{3} n^{3} - 6 \, c e^{2} f^{4} + 24 \, c d e f^{3} g + 24 \, a d f g^{3} - 12 \,{\left (2 \, c d^{2} + a e\right )} f^{2} g^{2} +{\left (c e^{2} g^{4} n^{3} + 6 \, c e^{2} g^{4} n^{2} + 11 \, c e^{2} g^{4} n + 6 \, c e^{2} g^{4}\right )} x^{4} +{\left (24 \, c d e g^{4} +{\left (c e^{2} f g^{3} + 3 \, c d e g^{4}\right )} n^{3} + 3 \,{\left (c e^{2} f g^{3} + 7 \, c d e g^{4}\right )} n^{2} + 2 \,{\left (c e^{2} f g^{3} + 21 \, c d e g^{4}\right )} n\right )} x^{3} +{\left (9 \, a d f g^{3} -{\left (2 \, c d^{2} + a e\right )} f^{2} g^{2}\right )} n^{2} +{\left (12 \,{\left (2 \, c d^{2} + a e\right )} g^{4} +{\left (3 \, c d e f g^{3} +{\left (2 \, c d^{2} + a e\right )} g^{4}\right )} n^{3} -{\left (3 \, c e^{2} f^{2} g^{2} - 15 \, c d e f g^{3} - 8 \,{\left (2 \, c d^{2} + a e\right )} g^{4}\right )} n^{2} -{\left (3 \, c e^{2} f^{2} g^{2} - 12 \, c d e f g^{3} - 19 \,{\left (2 \, c d^{2} + a e\right )} g^{4}\right )} n\right )} x^{2} +{\left (6 \, c d e f^{3} g + 26 \, a d f g^{3} - 7 \,{\left (2 \, c d^{2} + a e\right )} f^{2} g^{2}\right )} n +{\left (24 \, a d g^{4} +{\left (a d g^{4} +{\left (2 \, c d^{2} + a e\right )} f g^{3}\right )} n^{3} -{\left (6 \, c d e f^{2} g^{2} - 9 \, a d g^{4} - 7 \,{\left (2 \, c d^{2} + a e\right )} f g^{3}\right )} n^{2} + 2 \,{\left (3 \, c e^{2} f^{3} g - 12 \, c d e f^{2} g^{2} + 13 \, a d g^{4} + 6 \,{\left (2 \, c d^{2} + a e\right )} f g^{3}\right )} n\right )} x\right )}{\left (g x + f\right )}^{n}}{g^{4} n^{4} + 10 \, g^{4} n^{3} + 35 \, g^{4} n^{2} + 50 \, g^{4} n + 24 \, g^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(g*x+f)^n*(c*e*x^2+2*c*d*x+a),x, algorithm="fricas")

[Out]

(a*d*f*g^3*n^3 - 6*c*e^2*f^4 + 24*c*d*e*f^3*g + 24*a*d*f*g^3 - 12*(2*c*d^2 + a*e)*f^2*g^2 + (c*e^2*g^4*n^3 + 6
*c*e^2*g^4*n^2 + 11*c*e^2*g^4*n + 6*c*e^2*g^4)*x^4 + (24*c*d*e*g^4 + (c*e^2*f*g^3 + 3*c*d*e*g^4)*n^3 + 3*(c*e^
2*f*g^3 + 7*c*d*e*g^4)*n^2 + 2*(c*e^2*f*g^3 + 21*c*d*e*g^4)*n)*x^3 + (9*a*d*f*g^3 - (2*c*d^2 + a*e)*f^2*g^2)*n
^2 + (12*(2*c*d^2 + a*e)*g^4 + (3*c*d*e*f*g^3 + (2*c*d^2 + a*e)*g^4)*n^3 - (3*c*e^2*f^2*g^2 - 15*c*d*e*f*g^3 -
 8*(2*c*d^2 + a*e)*g^4)*n^2 - (3*c*e^2*f^2*g^2 - 12*c*d*e*f*g^3 - 19*(2*c*d^2 + a*e)*g^4)*n)*x^2 + (6*c*d*e*f^
3*g + 26*a*d*f*g^3 - 7*(2*c*d^2 + a*e)*f^2*g^2)*n + (24*a*d*g^4 + (a*d*g^4 + (2*c*d^2 + a*e)*f*g^3)*n^3 - (6*c
*d*e*f^2*g^2 - 9*a*d*g^4 - 7*(2*c*d^2 + a*e)*f*g^3)*n^2 + 2*(3*c*e^2*f^3*g - 12*c*d*e*f^2*g^2 + 13*a*d*g^4 + 6
*(2*c*d^2 + a*e)*f*g^3)*n)*x)*(g*x + f)^n/(g^4*n^4 + 10*g^4*n^3 + 35*g^4*n^2 + 50*g^4*n + 24*g^4)

________________________________________________________________________________________

Sympy [A]  time = 9.54863, size = 4908, normalized size = 33.62 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(g*x+f)**n*(c*e*x**2+2*c*d*x+a),x)

[Out]

Piecewise((f**n*(a*d*x + a*e*x**2/2 + c*d**2*x**2 + c*d*e*x**3 + c*e**2*x**4/4), Eq(g, 0)), (-2*a*d*f*g**3/(6*
f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) - a*e*f**2*g**2/(6*f**4*g**4 + 18*f**3*g**5*x
+ 18*f**2*g**6*x**2 + 6*f*g**7*x**3) - 3*a*e*f*g**3*x/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*
g**7*x**3) - 2*c*d**2*f**2*g**2/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) - 6*c*d**2*
f*g**3*x/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) + 6*c*d*e*g**4*x**3/(6*f**4*g**4 +
 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) + 6*c*e**2*f**4*log(f/g + x)/(6*f**4*g**4 + 18*f**3*g**5*
x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) + 5*c*e**2*f**4/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f
*g**7*x**3) + 18*c*e**2*f**3*g*x*log(f/g + x)/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**
3) + 9*c*e**2*f**3*g*x/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) + 18*c*e**2*f**2*g**
2*x**2*log(f/g + x)/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) + 6*c*e**2*f*g**3*x**3*
log(f/g + x)/(6*f**4*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3) - 6*c*e**2*f*g**3*x**3/(6*f**4
*g**4 + 18*f**3*g**5*x + 18*f**2*g**6*x**2 + 6*f*g**7*x**3), Eq(n, -4)), (-a*d*g**3/(2*f**2*g**4 + 4*f*g**5*x
+ 2*g**6*x**2) - a*e*f*g**2/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) - 2*a*e*g**3*x/(2*f**2*g**4 + 4*f*g**5*x
+ 2*g**6*x**2) - 2*c*d**2*f*g**2/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) - 4*c*d**2*g**3*x/(2*f**2*g**4 + 4*f
*g**5*x + 2*g**6*x**2) + 6*c*d*e*f**2*g*log(f/g + x)/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) + 9*c*d*e*f**2*g
/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) + 12*c*d*e*f*g**2*x*log(f/g + x)/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*
x**2) + 12*c*d*e*f*g**2*x/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) + 6*c*d*e*g**3*x**2*log(f/g + x)/(2*f**2*g*
*4 + 4*f*g**5*x + 2*g**6*x**2) - 6*c*e**2*f**3*log(f/g + x)/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) - 9*c*e**
2*f**3/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) - 12*c*e**2*f**2*g*x*log(f/g + x)/(2*f**2*g**4 + 4*f*g**5*x +
2*g**6*x**2) - 12*c*e**2*f**2*g*x/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) - 6*c*e**2*f*g**2*x**2*log(f/g + x)
/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2) + 2*c*e**2*g**3*x**3/(2*f**2*g**4 + 4*f*g**5*x + 2*g**6*x**2), Eq(n,
 -3)), (-2*a*d*g**3/(2*f*g**4 + 2*g**5*x) + 2*a*e*f*g**2*log(f/g + x)/(2*f*g**4 + 2*g**5*x) + 2*a*e*f*g**2/(2*
f*g**4 + 2*g**5*x) + 2*a*e*g**3*x*log(f/g + x)/(2*f*g**4 + 2*g**5*x) + 4*c*d**2*f*g**2*log(f/g + x)/(2*f*g**4
+ 2*g**5*x) + 4*c*d**2*f*g**2/(2*f*g**4 + 2*g**5*x) + 4*c*d**2*g**3*x*log(f/g + x)/(2*f*g**4 + 2*g**5*x) - 12*
c*d*e*f**2*g*log(f/g + x)/(2*f*g**4 + 2*g**5*x) - 12*c*d*e*f**2*g/(2*f*g**4 + 2*g**5*x) - 12*c*d*e*f*g**2*x*lo
g(f/g + x)/(2*f*g**4 + 2*g**5*x) + 6*c*d*e*g**3*x**2/(2*f*g**4 + 2*g**5*x) + 6*c*e**2*f**3*log(f/g + x)/(2*f*g
**4 + 2*g**5*x) + 6*c*e**2*f**3/(2*f*g**4 + 2*g**5*x) + 6*c*e**2*f**2*g*x*log(f/g + x)/(2*f*g**4 + 2*g**5*x) -
 3*c*e**2*f*g**2*x**2/(2*f*g**4 + 2*g**5*x) + c*e**2*g**3*x**3/(2*f*g**4 + 2*g**5*x), Eq(n, -2)), (a*d*log(f/g
 + x)/g - a*e*f*log(f/g + x)/g**2 + a*e*x/g - 2*c*d**2*f*log(f/g + x)/g**2 + 2*c*d**2*x/g + 3*c*d*e*f**2*log(f
/g + x)/g**3 - 3*c*d*e*f*x/g**2 + 3*c*d*e*x**2/(2*g) - c*e**2*f**3*log(f/g + x)/g**4 + c*e**2*f**2*x/g**3 - c*
e**2*f*x**2/(2*g**2) + c*e**2*x**3/(3*g), Eq(n, -1)), (a*d*f*g**3*n**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3
+ 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 9*a*d*f*g**3*n**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**
2 + 50*g**4*n + 24*g**4) + 26*a*d*f*g**3*n*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n +
 24*g**4) + 24*a*d*f*g**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + a*d*g
**4*n**3*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 9*a*d*g**4*n**2*x*(f
 + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 26*a*d*g**4*n*x*(f + g*x)**n/(g**
4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 24*a*d*g**4*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*
n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) - a*e*f**2*g**2*n**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g*
*4*n**2 + 50*g**4*n + 24*g**4) - 7*a*e*f**2*g**2*n*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*
g**4*n + 24*g**4) - 12*a*e*f**2*g**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g*
*4) + a*e*f*g**3*n**3*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 7*a*e*f
*g**3*n**2*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 12*a*e*f*g**3*n*x*
(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + a*e*g**4*n**3*x**2*(f + g*x)**n
/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 8*a*e*g**4*n**2*x**2*(f + g*x)**n/(g**4*n**
4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 19*a*e*g**4*n*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*
n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 12*a*e*g**4*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4
*n**2 + 50*g**4*n + 24*g**4) - 2*c*d**2*f**2*g**2*n**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 +
 50*g**4*n + 24*g**4) - 14*c*d**2*f**2*g**2*n*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*
n + 24*g**4) - 24*c*d**2*f**2*g**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4
) + 2*c*d**2*f*g**3*n**3*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 14*c
*d**2*f*g**3*n**2*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 24*c*d**2*f
*g**3*n*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 2*c*d**2*g**4*n**3*x*
*2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 16*c*d**2*g**4*n**2*x**2*(f
+ g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 38*c*d**2*g**4*n*x**2*(f + g*x)**n
/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 24*c*d**2*g**4*x**2*(f + g*x)**n/(g**4*n**4
 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 6*c*d*e*f**3*g*n*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**
3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 24*c*d*e*f**3*g*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**
2 + 50*g**4*n + 24*g**4) - 6*c*d*e*f**2*g**2*n**2*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50
*g**4*n + 24*g**4) - 24*c*d*e*f**2*g**2*n*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n
+ 24*g**4) + 3*c*d*e*f*g**3*n**3*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g
**4) + 15*c*d*e*f*g**3*n**2*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4)
+ 12*c*d*e*f*g**3*n*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 3*c*d*
e*g**4*n**3*x**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 21*c*d*e*g**4*
n**2*x**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 42*c*d*e*g**4*n*x**3*
(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 24*c*d*e*g**4*x**3*(f + g*x)**n
/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) - 6*c*e**2*f**4*(f + g*x)**n/(g**4*n**4 + 10*
g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 6*c*e**2*f**3*g*n*x*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 +
 35*g**4*n**2 + 50*g**4*n + 24*g**4) - 3*c*e**2*f**2*g**2*n**2*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 3
5*g**4*n**2 + 50*g**4*n + 24*g**4) - 3*c*e**2*f**2*g**2*n*x**2*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**
4*n**2 + 50*g**4*n + 24*g**4) + c*e**2*f*g**3*n**3*x**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2
+ 50*g**4*n + 24*g**4) + 3*c*e**2*f*g**3*n**2*x**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*
g**4*n + 24*g**4) + 2*c*e**2*f*g**3*n*x**3*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n +
 24*g**4) + c*e**2*g**4*n**3*x**4*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4)
 + 6*c*e**2*g**4*n**2*x**4*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 11*c
*e**2*g**4*n*x**4*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4) + 6*c*e**2*g**4
*x**4*(f + g*x)**n/(g**4*n**4 + 10*g**4*n**3 + 35*g**4*n**2 + 50*g**4*n + 24*g**4), True))

________________________________________________________________________________________

Giac [B]  time = 1.47953, size = 1374, normalized size = 9.41 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(g*x+f)^n*(c*e*x^2+2*c*d*x+a),x, algorithm="giac")

[Out]

((g*x + f)^n*c*g^4*n^3*x^4*e^2 + 3*(g*x + f)^n*c*d*g^4*n^3*x^3*e + 2*(g*x + f)^n*c*d^2*g^4*n^3*x^2 + (g*x + f)
^n*c*f*g^3*n^3*x^3*e^2 + 6*(g*x + f)^n*c*g^4*n^2*x^4*e^2 + 3*(g*x + f)^n*c*d*f*g^3*n^3*x^2*e + 21*(g*x + f)^n*
c*d*g^4*n^2*x^3*e + 2*(g*x + f)^n*c*d^2*f*g^3*n^3*x + 16*(g*x + f)^n*c*d^2*g^4*n^2*x^2 + 3*(g*x + f)^n*c*f*g^3
*n^2*x^3*e^2 + 11*(g*x + f)^n*c*g^4*n*x^4*e^2 + 15*(g*x + f)^n*c*d*f*g^3*n^2*x^2*e + (g*x + f)^n*a*g^4*n^3*x^2
*e + 42*(g*x + f)^n*c*d*g^4*n*x^3*e + 14*(g*x + f)^n*c*d^2*f*g^3*n^2*x + (g*x + f)^n*a*d*g^4*n^3*x + 38*(g*x +
 f)^n*c*d^2*g^4*n*x^2 - 3*(g*x + f)^n*c*f^2*g^2*n^2*x^2*e^2 + 2*(g*x + f)^n*c*f*g^3*n*x^3*e^2 + 6*(g*x + f)^n*
c*g^4*x^4*e^2 - 6*(g*x + f)^n*c*d*f^2*g^2*n^2*x*e + (g*x + f)^n*a*f*g^3*n^3*x*e + 12*(g*x + f)^n*c*d*f*g^3*n*x
^2*e + 8*(g*x + f)^n*a*g^4*n^2*x^2*e + 24*(g*x + f)^n*c*d*g^4*x^3*e - 2*(g*x + f)^n*c*d^2*f^2*g^2*n^2 + (g*x +
 f)^n*a*d*f*g^3*n^3 + 24*(g*x + f)^n*c*d^2*f*g^3*n*x + 9*(g*x + f)^n*a*d*g^4*n^2*x + 24*(g*x + f)^n*c*d^2*g^4*
x^2 - 3*(g*x + f)^n*c*f^2*g^2*n*x^2*e^2 - 24*(g*x + f)^n*c*d*f^2*g^2*n*x*e + 7*(g*x + f)^n*a*f*g^3*n^2*x*e + 1
9*(g*x + f)^n*a*g^4*n*x^2*e - 14*(g*x + f)^n*c*d^2*f^2*g^2*n + 9*(g*x + f)^n*a*d*f*g^3*n^2 + 26*(g*x + f)^n*a*
d*g^4*n*x + 6*(g*x + f)^n*c*f^3*g*n*x*e^2 + 6*(g*x + f)^n*c*d*f^3*g*n*e - (g*x + f)^n*a*f^2*g^2*n^2*e + 12*(g*
x + f)^n*a*f*g^3*n*x*e + 12*(g*x + f)^n*a*g^4*x^2*e - 24*(g*x + f)^n*c*d^2*f^2*g^2 + 26*(g*x + f)^n*a*d*f*g^3*
n + 24*(g*x + f)^n*a*d*g^4*x + 24*(g*x + f)^n*c*d*f^3*g*e - 7*(g*x + f)^n*a*f^2*g^2*n*e + 24*(g*x + f)^n*a*d*f
*g^3 - 6*(g*x + f)^n*c*f^4*e^2 - 12*(g*x + f)^n*a*f^2*g^2*e)/(g^4*n^4 + 10*g^4*n^3 + 35*g^4*n^2 + 50*g^4*n + 2
4*g^4)